<template>
    <div class="slider-list">
        <div
            :class="`slider-list-item ${type}`"
            v-for="(item, index) in list"
            :key="index"
            v-lazy="item">
            <img :src="item" />
        </div>
    </div>
</template>

<script>
export default {
  name: 'App',
  props: {
    type: {
      type: String
    },
    list: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style lang="scss">
.slider-list {
    width: auto;
    padding: 12px 0 16px 16px;
    overflow-x: scroll;
    white-space: nowrap;

    &::-webkit-scrollbar {
        display: none;
    }
    &-item {
        display: inline-block;
        vertical-align: middle;
        margin-right: 8px;
        width: 167px;
        height: 84px;
        border-radius: 8px;
        overflow: hidden;

        &.vertical {
            width: 109px;
            height: 144px;
        }

        img {
            width: 100%;
            height: 100%;
        }
    }
}
</style>
